var CacheDownload_EditRule={
	rule : null,
	result : null,
	
	tbInitialExpression : null,
	tbFileNameExpression : null,
	tbId : null,
	tbDescription : null,
	
	onLoad: function() {
	if (window.arguments && window.arguments.length)
	{
		newInstall = false;
		this.rule = window.arguments[0];
		this.result = window.arguments[1];
	}
	
	if (this.rule!=null) {
		this.tbInitialExpression = document.getElementById("tbInitialExpression");
		this.tbFileNameExpression = document.getElementById("tbFileNameExpression");
		this.tbId = document.getElementById("tbId");
		this.tbDescription = document.getElementById("tbDescription");
		
		this.tbFileNameExpression.value = this.rule["fileNameExpression"];
		this.tbInitialExpression.value = this.rule["initialExpression"];
		this.tbId.value = this.rule["id"];
		this.tbDescription.value = this.rule["description"];
	}
	
	},
	onDialogCancel: function() {
	
	}, 
	onDialogAccept: function() {
		this.rule["fileNameExpression"]=this.tbFileNameExpression.value;
		this.rule["initialExpression"]=this.tbInitialExpression.value;
		this.rule["id"]=this.tbId.value;
		this.rule["description"]=this.tbDescription.value;
		this.result["status"]=true;
	}
};
